package cn.kgc.auth.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Configuration // applicationContext.xml    springboot
@EnableSwagger2
@ComponentScan("cn.kgc.auth.controller")
@Component
@EnableWebMvc
public class SwaggerConfig {
    //<bean id="docketid class="Docket的全路径">
    @Bean
    public Docket docketid(){
      Docket docket  =new Docket(DocumentationType.SWAGGER_2);
        docket.apiInfo(new ApiInfo("这是爱旅行项目的文档标题","描述信息要全一点","1.0.0","https://www.baidu.com","张三","授权来自此处","http://www.163.com"));
        return  docket;
    }

}
